﻿using OAWeb.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace OAWeb.Controllers
{
    
    public class HomeController : Controller
    {
        private OADbContext db = new OADbContext();
        public ActionResult Index()
        {
            string Username = User.Identity.Name;
            return View();
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your application description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }
       
        public ActionResult Information_Depart()
        {
            return View();
        }
        public ActionResult Information_Depart2()
        {
            return View();
        }
        public ActionResult Information_DeparGra(int id)
        {
           
            var departmentGrade = db.DepartmentGrades.Where(d => d.DepartmentID == id).ToArray();
            int[] idItems = new int[departmentGrade.Length];
            for(int i = 0; i < departmentGrade.Length; i++)
            {
                idItems[i]= departmentGrade[i].ID;
            }
            ViewBag.idItems = idItems;
            return View(); 
        }
        public ActionResult Information_DeparGra2()
        {
            return View();
        }
        public ActionResult Information_Class()
        {
            return View(); 
        }
        public ActionResult FunctionChose()
        {
            return View(); 
        }
        public ActionResult ExamChose()
        {
            return View();
        }
        public ActionResult ExamChose2()
        {
            return View();
        }
        //public ActionResult Grade()
        //{
        //    return View(); 
        //}
        public ActionResult ScoreChose1()
        {
            return View();
        }
        public ActionResult ScoreChose2()
        {
            return View();
        }
        //public ActionResult ScoreChose3()
        //{
        //    return View();
        //}
        public ActionResult ScoreShow1()
        {
            return View();
        }
        public ActionResult ScoreEdit1()
        {
            return View();
        }
        public ActionResult ScoreEdit2()
        {
            return View();
        }
        
    }
}